<?php
if (isset($topicList) && count($topicList) > 0) {
    foreach ($topicList as $topicMsg) {
        $topicImg = make_img_name::make_img_mini_name(explode(';', $topicMsg->Picture, 2)[0]);
        if ($topicImg !== false && count($topicImg) > 0) {
            $isRecommend = $myTopic->topic_recommend_check($topicMsg->Id);
            if ($isRecommend === true) $recommendIconEx = ''; else $recommendIconEx = '-o';
            ?>
            <li style="padding: 10px">
                <div class="web-topicshow-div">
                    <a data-forward="controller=topic_show&topic_id=<?= $topicMsg->Id ?>" onclick="act_content(this)">
                        <img class="am-circle" alt="" src="<?= $CfgPara->httproot ?>/topic_pic/<?= $topicImg ?>"
                             width="80" height="80"/>
                    </a>
                    <div style="padding:5px 30px">
                        <div class="am-text-default" style="padding-top:30px">
                            <b class="web-tittle-color"><?= $topicMsg->Name ?></b>
                        </div>
                        <div style="padding-top:15px">
                            <span class="app-main-color am-text-xs">
                                <?php if ($topicMsg->State == 1) { ?>
                                    <span class="web-main-color"><?= formatDataSize($topicMsg->WorksCount) ?></span>
                                    <span class="web-gray-color">篇作品&nbsp;&bull;&nbsp;<span
                                                id="topic_up_count_<?= $topicMsg->Id ?>"><?= formatDataSize($topicMsg->UpCount) ?></span>人关注</span>
                                <?php } else { ?>
                                    <i class="am-icon am-icon-edit am-icon-fw"></i>草稿
                                <?php } ?>
                            </span>
                        </div>
                        <div style="height:43px; padding-top:15px">
                            <?php if ($isRecommend === true) { ?>
                                <button id="btn_topic_up" class="am-btn app-btn-followed am-radius am-btn-sm"
                                        data-topic-id="<?= $topicMsg->Id ?>"
                                        onclick="topic_up(this)" style="padding:5px 15px">
                                    已关注
                                </button>
                            <?php } else { ?>
                                <a class="am-btn app-btn-follow am-radius am-btn-sm"
                                   data-topic-id="<?= $topicMsg->Id ?>"
                                   onclick="topic_up(this)" style="padding:5px 15px">
                                    加关注
                                </a>
                            <?php } ?>
                        </div>
                    </div>
                </div>
            </li>
        <?php } //if($topicImg !== false && count($topicImg) > 0) 结束
    } //foreach ($topicList as $topicMsg)结束
} //if(isset($topicList))结束
else //没有内容
{
    if (isset($InputData['page_iscroll_load']) && $InputData['page_iscroll_load'] == 1)
        require("{$CfgPara->root}/view/warning_nocontent.app.v.php");
} ?>